<?php
if (!defined('BASEPATH'))
    exit('no direct script allowed asshole!!');
$this->load->helper('html');
?>


<!-- JavaScript -->
<script type="text/javascript" src="<?= base_url() ?>js/wufoo.js"></script>

<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />


<div id="container">
    <fieldset class="fieldset">
        <legend class="legend">|Detail Data Pegawai|</legend>

        <div id="contentform" style="border:solid thin #BBBBBB; height:350px; background-color:#F9F9F9; -moz-border-radius: 5px;  padding-top:10px; padding-bottom:0.3px; margin-right:100px; margin-left:100px;">

            <!-- Start value -->
            <?
            //Setting Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
            $value = array(
				'ID_PEGAWAI' => "",
                'NAMA_PEGAWAI' => "",
                'NAMA_PANGGILAN' => "",
                'TEMPAT_LAHIR' => "",
                'TANGGAL_LAHIR' => "",
                'GOLONGAN_DARAH' => "",
                'AGAMA' => "",
                'SUKU' => "",
                'BAHASA_SEHARI' => "",
                'DEPARTEMEN_PEGAWAI' => "",
                'BENGKEL' => "",
                'ALAMAT' => "",
                'TELEPON' => "",
                'STATUS' => "",
                'FOTO_PEGAWAI' => "",
				'act_form' => "pegawai/upload/"
            );
			

            //Setting Value pada form Jika melakukan prosedur Edit terhadap data tertentu.
            if ($status == "detail_pegawai") {
				$value['ID_PEGAWAI'] = $ID_PEGAWAI;
                $value['NAMA_PEGAWAI'] = $NAMA_PEGAWAI;
                $value['NAMA_PANGGILAN'] = $NAMA_PANGGILAN;
                $value['TEMPAT_LAHIR'] = $TEMPAT_LAHIR;
                $value['TANGGAL_LAHIR'] = $TANGGAL_LAHIR;
                $value['GOLONGAN_DARAH'] = $GOLONGAN_DARAH;
                $value['AGAMA'] = $AGAMA;
                $value['SUKU'] = $SUKU;
                $value['BAHASA_SEHARI'] = $BAHASA_SEHARI;
                $value['DEPARTEMEN_PEGAWAI'] = $DEPARTEMEN_PEGAWAI;
                $value['BENGKEL'] = $BENGKEL;
                $value['ALAMAT'] = $ALAMAT;
                $value['TELEPON'] = $TELEPON;
                $value['STATUS'] = $STATUS;
                $value['FOTO_PEGAWAI'] = $FOTO_PEGAWAI;
				$value['act_form'] = "pegawai/edit/" . $value['ID_PEGAWAI'];
                }//end if
            ?>

            <?= form_open_multipart($value["act_form"]); ?>
           
            <!-- End value -->

            <table width="847" border="0" bordercolor="#F0F0F0">
                <tr>
                    <td width="905" height="150">
                        <form id="form1" name="form1" method="post">
                            <div align="center">
                                <table width="850" border="0">
                                    <tr>
                                        <td width="80">Nama Pegawai</td>
                                        <td width="280">: <?= $value['NAMA_PEGAWAI'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Nama Panggilan</td>
                                        <td width="280">: <?= $value['NAMA_PANGGILAN'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Tempat Lahir</td>
                                        <td width="280">: <?= $value['TEMPAT_LAHIR'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">TanggaL_Lahir</td>
                                        <td width="280">: <?= $value['TANGGAL_LAHIR'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Golongan Darah</td>
                                        <td width="280">: <?= $value['GOLONGAN_DARAH'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Agama</td>
                                        <td width="280">: <?= $value['AGAMA'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Suku</td>
                                        <td width="280">: <?= $value['SUKU'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Bahasa-Sehari-hari</td>
                                        <td width="280">: <?= $value['BAHASA_SEHARI'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Departemen Pegawai</td>
                                        <td width="280">: <?= $value['DEPARTEMEN_PEGAWAI'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Bengkel</td>
                                        <td width="208">: <?= $value['BENGKEL'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Alamat</td>
                                        <td width="208">: <?= $value['ALAMAT'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Telepon</td>
                                        <td width="208">: <?= $value['TELEPON'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Status</td>
                                        <td width="208">: <?= $value['STATUS'] ?></td>
                                    </tr>
									
							
									<?
                                    if ($status == "detail_pegawai") {
                                        echo '
                                            <tr>
                                            <td width="80">&nbsp;</td>
                                            <td width="208"> <img src='.$FOTO_PEGAWAI.' width="150" height="150"></td>
                                            </tr>

                                            
                                        ';
										
                                    } else {
                                        echo'
                                        <tr>
                                        <td>Foto</td>
                                        <td><input type="file" name="FOTO_PEGAWAI" size="30"/></td>
                                        </tr>
                                        ';
                                    }
                                    ?>
									<tr>
                                        <td height="28">&nbsp;</td>
                                        <td>
                                            <div align="left">
                                                <input type="submit" name="Submit" value="Edit" />
												<a href="<?php echo site_url('pegawai/index') ?>">
												<input type="button" value="Kembali" />
												</a>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </form>
                        <p align="center">&nbsp;</p></td></tr>
            </table>
        </div>
        <p>&nbsp;</p>
    </fieldset>
</div>
<p>
    <!--container-->
</p>
<p>&nbsp; </p>

